OTGetEndpointState
Obtains the current state of an endpoint.C INTERFACE
OTResult OTGetEndpointState(EndpointRef ref);C++ INTERFACE
OTResult TEndpoint::GetEndpointState();PARAMETERS
ref
- The endpoint reference of the endpoint whose state you want to determine.
DESCRIPTION
TheOTGetEndpointState
function returns an integer greater than or equal to 0 indicating the state of the specified endpoint. The endpoint state enumeration describes possible endpoint states and lists their decimal value.If the function fails, it returns a negative integer specifying the error code. You must open an endpoint before you can determine its state.
You might need to know an endpoint's state in order to determine whether a function has completed or whether the endpoint is in an appropriate state for the function that you want to call next.
This function returns endpoint state information immediately, whether the endpoint is in synchronous or asynchronous mode.
VALID STATES
AllSEE ALSO
For general information about the services provided by an endpoint and the size of buffers it can use, use theOTGetEndpointInfo
function (page 3-82).The section "Endpoint States," beginning on page 3-13 explains how you use a knowledge of an endpoint's state to manage endpoints.
The endpoint state enumeration (page 3-46), describes possible endpoint states and lists their decimal value.
Use the
OTOpenEndpoint
function (page 3-74) or theOTAsyncOpenEndpoint
function (page 3-76) to open an endpoint.